//
//  IoriMp3MetaInfo.h
//  SDJK
//
//  Created by Jobs on 9/13/16.
//  Copyright © 2016 com.FlintInfo.dEMO. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@interface AssetItem : NSObject <NSCopying>

@property (strong, nonatomic) NSURL *assetURL;
@property (strong, nonatomic) AVAsset *asset;

@property (strong, nonatomic, readonly) NSString *title;
@property (strong, nonatomic, readonly) NSString *artist;
@property (strong, nonatomic, readonly) NSString *album;
@property (strong, nonatomic, readonly) UIImage *image;

@property (assign, nonatomic, readonly) BOOL metadataLoaded;
@property (assign, nonatomic, readonly) BOOL isVideo;

- (id)initWithURL:(NSURL *)aURL;
- (id)initWithAsset:(AssetItem *)assetItem;
- (void)loadAssetMetadataWithCompletionHandler:(void (^)(AssetItem *assetItem))completion;
- (NSString *)loadTitleForAsset:(AVAsset *)a;
- (NSString *)loadArtistForAsset:(AVAsset *)a;
- (NSString *)loadAlbumForAsset:(AVAsset *)a;
- (UIImage *)loadImageForAsset:(AVAsset *)a;
@end
